package org.pp.core;


import lombok.Getter;

@Getter
public class BizExcept extends RuntimeException {
    private Integer code = -1;

    public BizExcept() {
        super("操作失败");
        this.code = -1;
    }

    public BizExcept(String message) {
        super(message);
        this.code = -1;
    }

    public BizExcept(Integer code, String message) {
        super(message);
        this.code = code;
    }


    public static BizExcept erro(Integer code, String message) {
        return new BizExcept(code, message);
    }

    public static BizExcept erro(String message) {
        return new BizExcept(-1, message);
    }
}
